package com.petRescueCenter.demo.voluntary.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import com.petRescueCenter.demo.user.entity.User;
import com.petRescueCenter.demo.voluntary.entity.UserVoluntary;
import com.petRescueCenter.demo.voluntary.entity.Voluntary;
import com.petRescueCenter.demo.voluntary.entity.DTO.VoluntaryDTO;

public interface IVoluntaryService {
	public Voluntary save(Voluntary entity);

	public Voluntary findById(Long id);

	public boolean existsById(Long id);

	public long count();

	public void deleteById(Long id);

	public void deleteAll(Long[] ids);

	public Page<VoluntaryDTO> findAll(Long userId, Specification<Voluntary> spec, Pageable pageable);

	public Page<VoluntaryDTO> getVoluntary(Specification<UserVoluntary> spec, Pageable pageable);

	public boolean existsByName(String name);

	public User findByName(String name);

	public boolean isEnd(Long voluntaryId);
}
